//
//  UIView+AddView.m
//  HumanResource
//
//  Created by Gu on 15/11/19.
//  Copyright © 2015年 hang.yu. All rights reserved.
//

#import "UIView+AddView.h"

@implementation UIView (AddView)


- (void)changeView_Height:(float)Height{
    CGRect rect=self.frame;
    rect.size.height=Height;
    self.frame=rect;
}

- (void)changeView_Width:(float)Width{
    CGRect rect=self.frame;
    rect.size.width=Width;
    self.frame=rect;
}

- (void)changeView_X:(float)X{
    CGRect rect=self.frame;
    rect.origin.x=X;
    self.frame=rect;
}

- (void)changeView_Y:(float)Y{
    CGRect rect=self.frame;
    rect.origin.y=Y;
    self.frame=rect;
}

- (CGFloat)getView_Height{
    return self.frame.size.height;
}

- (CGFloat)getView_Width{
    return self.frame.size.width;
}

- (CGFloat)getView_X{
    return self.frame.origin.x;
}

- (CGFloat)getView_Y{
    return self.frame.origin.y;
}
- (void)setX:(CGFloat)x{
    CGRect rect=self.frame;
    rect.origin.x=x;
    self.frame=rect;
}

- (void)setY:(CGFloat)y{
    CGRect rect=self.frame;
    rect.origin.y=y;
    self.frame=rect;
}

- (void)setWidth:(CGFloat)width{
    CGRect rect=self.frame;
    rect.size.width=width;
    self.frame=rect;
}

- (void)setHeight:(CGFloat)height{
    CGRect rect=self.frame;
    rect.size.height=height;
    self.frame=rect;
}

- (CGFloat)x{
    return self.frame.origin.x;
}

- (CGFloat)y{
    return self.frame.origin.y;
}

- (CGFloat)width{
    return self.frame.size.width;
}

- (CGFloat)height{
    return self.frame.size.height;
}


@end
